//
//  NativeCallVO.m
//  Base
//
//  Created by liuwei7 on 2017/8/16.
//  Copyright © 2017年 com.yhd. All rights reserved.
//

#import "NativeCallVO.h"
#import "ServiceCode-Swift.h"

NSString const *RouterCallbackKey = @"routercallback";
NSString const *RouterParamKey = @"body";
NSString const *RouterAppParamKey = @"params";
NSString const *RouterWillExecuteKey = @"routerwillexecute";//router 将要跳转时的 回调

NSString const *RouterFromHostKey = @"RouterFromHostKey";
NSString const *RouterFromSchemeKey = @"RouterFromSchemeKey";

@implementation NativeCallVO
/**
 * 负责往调用处  回传 参数
 */
- (id _Nonnull )callBlockWithParams:(nonnull NSDictionary *)params {
    NativeCallVOBlock callBlock  = self.params[RouterCallbackKey];
    if (callBlock && params) {
        return callBlock(params);
    }
    return nil;
}

+ (void)updateUserInterfaceStyle:(UIUserInterfaceStyle)style {
    [UserInterfaceMagager updateUserInterfaceStyle:style];
}

+ (void)resetUserInterfaceStyle {
    [UserInterfaceMagager updateUserInterfaceStyle:[UserInterfaceMagager manager].currentStyle];
    
}
@end
